using System;
using System.ComponentModel.DataAnnotations;

namespace CR.Application.DTOs
{
    /// <summary>
    /// 食品安全信息DTO
    /// </summary>
    public class FoodSafetyInfoDTO
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 溯源码
        /// </summary>
        [Required(ErrorMessage = "溯源码不能为空")]
        [StringLength(50, ErrorMessage = "溯源码长度不能超过50个字符")]
        public string TraceabilityCode { get; set; }

        /// <summary>
        /// 检测日期
        /// </summary>
        public DateTime TestDate { get; set; }

        /// <summary>
        /// 检测结果
        /// </summary>
        [StringLength(1000, ErrorMessage = "检测结果长度不能超过1000个字符")]
        public string TestResult { get; set; }

        /// <summary>
        /// 检测项目
        /// </summary>
        [StringLength(500, ErrorMessage = "检测项目长度不能超过500个字符")]
        public string TestItems { get; set; }

        /// <summary>
        /// 检测机构
        /// </summary>
        [StringLength(100, ErrorMessage = "检测机构长度不能超过100个字符")]
        public string TestOrganization { get; set; }

        /// <summary>
        /// 检测人员
        /// </summary>
        [StringLength(50, ErrorMessage = "检测人员长度不能超过50个字符")]
        public string Tester { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }
    }
} 